.class Lcom/peptalk/client/lbs/android/LbsManager;
.super Ljava/lang/Object;
.source "LbsManager.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/peptalk/client/lbs/android/LbsManager$LbsTimerTask;
    }
.end annotation


# static fields
.field private static final CELL_LOCATION_TYPE_CDMA:I = 0x2

.field private static final CELL_LOCATION_TYPE_GSM:I = 0x1

.field private static final CELL_LOCATION_TYPE_UNKNOWN:I = -0x1

.field private static apiKey:Ljava/lang/String;

.field private static lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

.field private static serial:I


# instance fields
.field private carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

.field private carrierLocationListener:Landroid/location/LocationListener;

.field private carrierLocationProvider:Ljava/lang/String;

.field private carrierScaned:Z

.field private cdmaCells:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/peptalk/client/lbs/android/CdmaCell;",
            ">;"
        }
    .end annotation
.end field

.field private cipherText:Ljava/lang/String;

.field private context:Landroid/content/Context;

.field private debug:Z

.field private debugText:Ljava/lang/String;

.field private gsmCells:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/peptalk/client/lbs/android/GsmCell;",
            ">;"
        }
    .end annotation
.end field

.field private lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

.field private lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

.field private lastLocation:Landroid/location/Location;

.field private lbsTasks:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Landroid/location/LocationListener;",
            "Lcom/peptalk/client/lbs/android/LbsManager$LbsTimerTask;",
            ">;"
        }
    .end annotation
.end field

.field private locationManager:Landroid/location/LocationManager;

.field private phone:Lcom/peptalk/client/lbs/android/Telephone;

.field private phoneStateListener:Landroid/telephony/PhoneStateListener;

.field private phoneType:I

.field private telephonyManager:Landroid/telephony/TelephonyManager;

.field private timer:Ljava/util/Timer;

.field private wifiManager:Landroid/net/wifi/WifiManager;

.field private wifiReciever:Landroid/content/BroadcastReceiver;

.field private wifiScaned:Z

.field private wifis:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/peptalk/client/lbs/android/Wifi;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 59
    const/4 v0, 0x0

    sput-object v0, Lcom/peptalk/client/lbs/android/LbsManager;->apiKey:Ljava/lang/String;

    .line 65
    const/4 v0, 0x0

    sput v0, Lcom/peptalk/client/lbs/android/LbsManager;->serial:I

    .line 56
    return-void
.end method

.method private constructor <init>(Landroid/content/Context;)V
    .locals 3
    .parameter "context"

    .prologue
    const/4 v2, 0x0

    .line 288
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 60
    const-string v0, ""

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->cipherText:Ljava/lang/String;

    .line 61
    new-instance v0, Landroid/location/Location;

    const-string v1, ""

    invoke-direct {v0, v1}, Landroid/location/Location;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastLocation:Landroid/location/Location;

    .line 69
    const/4 v0, -0x1

    iput v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phoneType:I

    .line 76
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationProvider:Ljava/lang/String;

    .line 77
    new-instance v0, Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-direct {v0}, Lcom/peptalk/client/lbs/android/PhoneLocation;-><init>()V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    .line 78
    new-instance v0, Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-direct {v0}, Lcom/peptalk/client/lbs/android/PhoneLocation;-><init>()V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    .line 79
    new-instance v0, Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-direct {v0}, Lcom/peptalk/client/lbs/android/PhoneLocation;-><init>()V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    .line 81
    iput-boolean v2, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiScaned:Z

    .line 82
    iput-boolean v2, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierScaned:Z

    .line 84
    new-instance v0, Lcom/peptalk/client/lbs/android/Telephone;

    invoke-direct {v0}, Lcom/peptalk/client/lbs/android/Telephone;-><init>()V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    .line 85
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->gsmCells:Ljava/util/ArrayList;

    .line 86
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->cdmaCells:Ljava/util/ArrayList;

    .line 87
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifis:Ljava/util/ArrayList;

    .line 89
    new-instance v0, Lcom/peptalk/client/lbs/android/LbsManager$1;

    invoke-direct {v0, p0}, Lcom/peptalk/client/lbs/android/LbsManager$1;-><init>(Lcom/peptalk/client/lbs/android/LbsManager;)V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phoneStateListener:Landroid/telephony/PhoneStateListener;

    .line 181
    new-instance v0, Lcom/peptalk/client/lbs/android/LbsManager$2;

    invoke-direct {v0, p0}, Lcom/peptalk/client/lbs/android/LbsManager$2;-><init>(Lcom/peptalk/client/lbs/android/LbsManager;)V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationListener:Landroid/location/LocationListener;

    .line 212
    new-instance v0, Lcom/peptalk/client/lbs/android/LbsManager$3;

    invoke-direct {v0, p0}, Lcom/peptalk/client/lbs/android/LbsManager$3;-><init>(Lcom/peptalk/client/lbs/android/LbsManager;)V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiReciever:Landroid/content/BroadcastReceiver;

    .line 241
    new-instance v0, Ljava/util/Timer;

    invoke-direct {v0}, Ljava/util/Timer;-><init>()V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->timer:Ljava/util/Timer;

    .line 242
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsTasks:Ljava/util/HashMap;

    .line 359
    iput-boolean v2, p0, Lcom/peptalk/client/lbs/android/LbsManager;->debug:Z

    .line 289
    iput-object p1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->context:Landroid/content/Context;

    .line 290
    const-string v0, "location"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/location/LocationManager;

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->locationManager:Landroid/location/LocationManager;

    .line 291
    const-string v0, "wifi"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiManager:Landroid/net/wifi/WifiManager;

    .line 292
    const-string v0, "phone"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    .line 294
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phoneStateListener:Landroid/telephony/PhoneStateListener;

    const/16 v2, 0x10

    invoke-virtual {v0, v1, v2}, Landroid/telephony/TelephonyManager;->listen(Landroid/telephony/PhoneStateListener;I)V

    .line 296
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiReciever:Landroid/content/BroadcastReceiver;

    new-instance v1, Landroid/content/IntentFilter;

    const-string v2, "android.net.wifi.SCAN_RESULTS"

    invoke-direct {v1, v2}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1, v0, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 297
    return-void
.end method

.method static synthetic access$0(Lcom/peptalk/client/lbs/android/LbsManager;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 69
    iput p1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phoneType:I

    return-void
.end method

.method static synthetic access$1(Lcom/peptalk/client/lbs/android/LbsManager;)Ljava/util/ArrayList;
    .locals 1
    .parameter

    .prologue
    .line 85
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->gsmCells:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$10(Lcom/peptalk/client/lbs/android/LbsManager;)Ljava/util/ArrayList;
    .locals 1
    .parameter

    .prologue
    .line 87
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifis:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$11(Lcom/peptalk/client/lbs/android/LbsManager;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 81
    iput-boolean p1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiScaned:Z

    return-void
.end method

.method static synthetic access$12(Lcom/peptalk/client/lbs/android/LbsManager;)Z
    .locals 1
    .parameter

    .prologue
    .line 82
    iget-boolean v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierScaned:Z

    return v0
.end method

.method static synthetic access$13(Lcom/peptalk/client/lbs/android/LbsManager;)Landroid/location/Location;
    .locals 1
    .parameter

    .prologue
    .line 61
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastLocation:Landroid/location/Location;

    return-object v0
.end method

.method static synthetic access$14(Lcom/peptalk/client/lbs/android/LbsManager;Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 759
    invoke-direct {p0, p1}, Lcom/peptalk/client/lbs/android/LbsManager;->requstLocation(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$15(Lcom/peptalk/client/lbs/android/LbsManager;Landroid/location/Location;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 61
    iput-object p1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastLocation:Landroid/location/Location;

    return-void
.end method

.method static synthetic access$2(Lcom/peptalk/client/lbs/android/LbsManager;)Ljava/util/ArrayList;
    .locals 1
    .parameter

    .prologue
    .line 86
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->cdmaCells:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$3(Lcom/peptalk/client/lbs/android/LbsManager;)I
    .locals 1
    .parameter

    .prologue
    .line 69
    iget v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phoneType:I

    return v0
.end method

.method static synthetic access$4(Lcom/peptalk/client/lbs/android/LbsManager;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 76
    iput-object p1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationProvider:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$5(Lcom/peptalk/client/lbs/android/LbsManager;)Lcom/peptalk/client/lbs/android/PhoneLocation;
    .locals 1
    .parameter

    .prologue
    .line 77
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    return-object v0
.end method

.method static synthetic access$6(Lcom/peptalk/client/lbs/android/LbsManager;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 60
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->cipherText:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$7(Lcom/peptalk/client/lbs/android/LbsManager;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 82
    iput-boolean p1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierScaned:Z

    return-void
.end method

.method static synthetic access$8(Lcom/peptalk/client/lbs/android/LbsManager;)Z
    .locals 1
    .parameter

    .prologue
    .line 81
    iget-boolean v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiScaned:Z

    return v0
.end method

.method static synthetic access$9(Lcom/peptalk/client/lbs/android/LbsManager;)Landroid/net/wifi/WifiManager;
    .locals 1
    .parameter

    .prologue
    .line 72
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiManager:Landroid/net/wifi/WifiManager;

    return-object v0
.end method

.method private buildLbsCipherText(JLandroid/os/Looper;)V
    .locals 12
    .parameter "maxTime"
    .parameter "looper"

    .prologue
    const/4 v11, 0x3

    .line 403
    invoke-direct {p0}, Lcom/peptalk/client/lbs/android/LbsManager;->updateTelephoneInfo()V

    .line 405
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifis:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 406
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v0}, Lcom/peptalk/client/lbs/android/PhoneLocation;->reset()V

    .line 407
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationProvider:Ljava/lang/String;

    .line 408
    iget-object v10, p0, Lcom/peptalk/client/lbs/android/LbsManager;->cipherText:Ljava/lang/String;

    monitor-enter v10

    .line 409
    :try_start_0
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->locationManager:Landroid/location/LocationManager;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/location/LocationManager;->getProviders(Z)Ljava/util/List;

    move-result-object v9

    .line 411
    .local v9, providers:Ljava/util/List;,"Ljava/util/List<Ljava/lang/String;>;"
    invoke-interface {v9}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_4

    .line 412
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierScaned:Z

    .line 414
    invoke-interface {v9}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v8

    .line 415
    .local v8, providerIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/String;>;"
    :goto_0
    invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_2

    .line 419
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiManager:Landroid/net/wifi/WifiManager;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->getWifiState()I

    move-result v0

    if-ne v0, v11, :cond_3

    .line 420
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiScaned:Z

    .line 421
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiManager:Landroid/net/wifi/WifiManager;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->startScan()Z

    .line 426
    :goto_1
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->locationManager:Landroid/location/LocationManager;

    const-string v1, "gps"

    invoke-virtual {v0, v1}, Landroid/location/LocationManager;->getLastKnownLocation(Ljava/lang/String;)Landroid/location/Location;

    move-result-object v7

    .line 427
    .local v7, location:Landroid/location/Location;
    if-eqz v7, :cond_0

    .line 428
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v7}, Landroid/location/Location;->getLatitude()D

    move-result-wide v1

    iput-wide v1, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    .line 429
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v7}, Landroid/location/Location;->getLongitude()D

    move-result-wide v1

    iput-wide v1, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    .line 430
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v7}, Landroid/location/Location;->getAccuracy()F

    move-result v1

    iput v1, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->accuracy:F

    .line 431
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v7}, Landroid/location/Location;->getTime()J

    move-result-wide v1

    iput-wide v1, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->time:J

    .line 434
    :cond_0
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->locationManager:Landroid/location/LocationManager;

    const-string v1, "network"

    invoke-virtual {v0, v1}, Landroid/location/LocationManager;->getLastKnownLocation(Ljava/lang/String;)Landroid/location/Location;

    move-result-object v7

    .line 435
    if-eqz v7, :cond_1

    .line 436
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v7}, Landroid/location/Location;->getLatitude()D

    move-result-wide v1

    iput-wide v1, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    .line 437
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v7}, Landroid/location/Location;->getLongitude()D

    move-result-wide v1

    iput-wide v1, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    .line 438
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v7}, Landroid/location/Location;->getAccuracy()F

    move-result v1

    iput v1, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->accuracy:F

    .line 439
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v7}, Landroid/location/Location;->getTime()J

    move-result-wide v1

    iput-wide v1, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->time:J
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 442
    :cond_1
    :try_start_1
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->cipherText:Ljava/lang/String;

    invoke-virtual {v0, p1, p2}, Ljava/lang/Object;->wait(J)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_2

    .line 445
    :goto_2
    :try_start_2
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->locationManager:Landroid/location/LocationManager;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationListener:Landroid/location/LocationListener;

    invoke-virtual {v0, v1}, Landroid/location/LocationManager;->removeUpdates(Landroid/location/LocationListener;)V

    .line 408
    .end local v7           #location:Landroid/location/Location;
    .end local v8           #providerIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/String;>;"
    :goto_3
    monitor-exit v10

    .line 464
    return-void

    .line 416
    .restart local v8       #providerIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/String;>;"
    :cond_2
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->locationManager:Landroid/location/LocationManager;

    invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    const-wide/16 v2, 0x0

    const/4 v4, 0x0

    iget-object v5, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationListener:Landroid/location/LocationListener;

    move-object v6, p3

    invoke-virtual/range {v0 .. v6}, Landroid/location/LocationManager;->requestLocationUpdates(Ljava/lang/String;JFLandroid/location/LocationListener;Landroid/os/Looper;)V

    goto/16 :goto_0

    .line 408
    .end local v8           #providerIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/String;>;"
    .end local v9           #providers:Ljava/util/List;,"Ljava/util/List<Ljava/lang/String;>;"
    :catchall_0
    move-exception v0

    monitor-exit v10
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw v0

    .line 423
    .restart local v8       #providerIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/String;>;"
    .restart local v9       #providers:Ljava/util/List;,"Ljava/util/List<Ljava/lang/String;>;"
    :cond_3
    const/4 v0, 0x1

    :try_start_3
    iput-boolean v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiScaned:Z

    goto :goto_1

    .line 447
    .end local v8           #providerIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/String;>;"
    :cond_4
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierScaned:Z

    .line 449
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiManager:Landroid/net/wifi/WifiManager;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->getWifiState()I

    move-result v0

    if-ne v0, v11, :cond_5

    .line 450
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiScaned:Z

    .line 451
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiManager:Landroid/net/wifi/WifiManager;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->startScan()Z
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 453
    :try_start_4
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->cipherText:Ljava/lang/String;

    invoke-virtual {v0, p1, p2}, Ljava/lang/Object;->wait(J)V
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0
    .catch Ljava/lang/InterruptedException; {:try_start_4 .. :try_end_4} :catch_0

    goto :goto_3

    .line 454
    :catch_0
    move-exception v0

    goto :goto_3

    .line 458
    :cond_5
    :try_start_5
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->cipherText:Ljava/lang/String;

    const-wide/16 v1, 0xc8

    invoke-virtual {v0, v1, v2}, Ljava/lang/Object;->wait(J)V
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0
    .catch Ljava/lang/InterruptedException; {:try_start_5 .. :try_end_5} :catch_1

    goto :goto_3

    .line 459
    :catch_1
    move-exception v0

    goto :goto_3

    .line 443
    .restart local v7       #location:Landroid/location/Location;
    .restart local v8       #providerIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/String;>;"
    :catch_2
    move-exception v0

    goto :goto_2
.end method

.method private debugRender(J)Ljava/lang/String;
    .locals 17
    .parameter "currentTime"

    .prologue
    .line 492
    new-instance v6, Ljava/lang/StringBuffer;

    invoke-direct {v6}, Ljava/lang/StringBuffer;-><init>()V

    .line 493
    .local v6, lbsData:Ljava/lang/StringBuffer;
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "TESTING: No."

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget v14, Lcom/peptalk/client/lbs/android/LbsManager;->serial:I

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, " GET Location.\n"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 494
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "phone model: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    move-object v14, v0

    iget-object v14, v14, Lcom/peptalk/client/lbs/android/Telephone;->model:Ljava/lang/String;

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "\n"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 495
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "network type = "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    move-object v14, v0

    invoke-virtual {v14}, Landroid/telephony/TelephonyManager;->getNetworkType()I

    move-result v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "\n"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 497
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->locationManager:Landroid/location/LocationManager;

    move-object v13, v0

    const/4 v14, 0x1

    invoke-virtual {v13, v14}, Landroid/location/LocationManager;->getProviders(Z)Ljava/util/List;

    move-result-object v10

    .line 498
    .local v10, providers:Ljava/util/List;,"Ljava/util/List<Ljava/lang/String;>;"
    invoke-interface {v10}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v9

    .line 499
    .local v9, providerIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Ljava/lang/String;>;"
    const-string v13, "avaible providers ="

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 500
    :goto_0
    invoke-interface {v9}, Ljava/util/Iterator;->hasNext()Z

    move-result v13

    if-nez v13, :cond_4

    .line 503
    const-string v13, "\n"

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 504
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationProvider:Ljava/lang/String;

    move-object v13, v0

    if-eqz v13, :cond_0

    .line 505
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "carrierLocation provider: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationProvider:Ljava/lang/String;

    move-object v14, v0

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, ";\n"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 506
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    move-object v13, v0

    iget-wide v13, v13, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    const-wide v15, 0x40f86a0000000000L

    cmpg-double v13, v13, v15

    if-gez v13, :cond_0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    move-object v13, v0

    iget-wide v13, v13, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    const-wide v15, 0x40f86a0000000000L

    cmpg-double v13, v13, v15

    if-gez v13, :cond_0

    .line 507
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "carrierLocation: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    move-object v14, v0

    move-object v0, v14

    move-wide/from16 v1, p1

    invoke-virtual {v0, v1, v2}, Lcom/peptalk/client/lbs/android/PhoneLocation;->toString(J)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 511
    :cond_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    move-object v13, v0

    iget-wide v13, v13, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    const-wide v15, 0x40f86a0000000000L

    cmpg-double v13, v13, v15

    if-gez v13, :cond_1

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    move-object v13, v0

    iget-wide v13, v13, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    const-wide v15, 0x40f86a0000000000L

    cmpg-double v13, v13, v15

    if-gez v13, :cond_1

    .line 512
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "lastKnownGpsLocation: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    move-object v14, v0

    move-object v0, v14

    move-wide/from16 v1, p1

    invoke-virtual {v0, v1, v2}, Lcom/peptalk/client/lbs/android/PhoneLocation;->toString(J)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 514
    :cond_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    move-object v13, v0

    iget-wide v13, v13, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    const-wide v15, 0x40f86a0000000000L

    cmpg-double v13, v13, v15

    if-gez v13, :cond_2

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    move-object v13, v0

    iget-wide v13, v13, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    const-wide v15, 0x40f86a0000000000L

    cmpg-double v13, v13, v15

    if-gez v13, :cond_2

    .line 515
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "lastKnownNetworkLocation: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    move-object v14, v0

    move-object v0, v14

    move-wide/from16 v1, p1

    invoke-virtual {v0, v1, v2}, Lcom/peptalk/client/lbs/android/PhoneLocation;->toString(J)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 518
    :cond_2
    move-object/from16 v0, p0

    iget v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->phoneType:I

    move v13, v0

    const/4 v14, 0x1

    if-ne v13, v14, :cond_6

    .line 519
    const-string v13, "phoneType=GSM; "

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 520
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "Size="

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->gsmCells:Ljava/util/ArrayList;

    move-object v14, v0

    invoke-virtual {v14}, Ljava/util/ArrayList;->size()I

    move-result v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "\n"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 521
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->gsmCells:Ljava/util/ArrayList;

    move-object v13, v0

    invoke-virtual {v13}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v5

    .line 522
    .local v5, gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    :goto_1
    invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z

    move-result v13

    if-nez v13, :cond_5

    .line 533
    .end local v5           #gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    :cond_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->wifis:Ljava/util/ArrayList;

    move-object v13, v0

    invoke-virtual {v13}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v11

    .line 534
    .local v11, wifiIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "wifi scan time:"

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object v0, v13

    move-wide/from16 v1, p1

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "; "

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "size="

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->wifis:Ljava/util/ArrayList;

    move-object v14, v0

    invoke-virtual {v14}, Ljava/util/ArrayList;->size()I

    move-result v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "\n"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 536
    :goto_2
    invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z

    move-result v13

    if-nez v13, :cond_7

    .line 540
    const-string v13, "\n"

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 541
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    move-object v13, v0

    invoke-virtual {v13}, Landroid/telephony/TelephonyManager;->getNeighboringCellInfo()Ljava/util/List;

    move-result-object v8

    .line 542
    .local v8, neighborCellInfos:Ljava/util/List;,"Ljava/util/List<Landroid/telephony/NeighboringCellInfo;>;"
    invoke-interface {v8}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    .line 544
    .local v3, NeighboringCellInfoIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/telephony/NeighboringCellInfo;>;"
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "NeighboringCell scan time:"

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object v0, v13

    move-wide/from16 v1, p1

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "; "

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "size="

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-interface {v8}, Ljava/util/List;->size()I

    move-result v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "\n"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 545
    :goto_3
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v13

    if-nez v13, :cond_8

    .line 549
    invoke-virtual {v6}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v13

    return-object v13

    .line 501
    .end local v3           #NeighboringCellInfoIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/telephony/NeighboringCellInfo;>;"
    .end local v8           #neighborCellInfos:Ljava/util/List;,"Ljava/util/List<Landroid/telephony/NeighboringCellInfo;>;"
    .end local v11           #wifiIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    :cond_4
    new-instance v13, Ljava/lang/StringBuilder;

    invoke-interface {v9}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->toString()Ljava/lang/String;

    move-result-object v14

    invoke-static {v14}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v14

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v14, "; "

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto/16 :goto_0

    .line 523
    .restart local v5       #gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    :cond_5
    invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/peptalk/client/lbs/android/GsmCell;

    move-object v0, v3

    move-wide/from16 v1, p1

    invoke-virtual {v0, v1, v2}, Lcom/peptalk/client/lbs/android/GsmCell;->toString(J)Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto/16 :goto_1

    .line 525
    .end local v5           #gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    :cond_6
    move-object/from16 v0, p0

    iget v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->phoneType:I

    move v13, v0

    const/4 v14, 0x2

    if-ne v13, v14, :cond_3

    .line 526
    const-string v13, "phoneType=CDMA; "

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 527
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "Size="

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->cdmaCells:Ljava/util/ArrayList;

    move-object v14, v0

    invoke-virtual {v14}, Ljava/util/ArrayList;->size()I

    move-result v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "\n"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 528
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->cdmaCells:Ljava/util/ArrayList;

    move-object v13, v0

    invoke-virtual {v13}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v4

    .line 529
    .local v4, cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    :goto_4
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v13

    if-eqz v13, :cond_3

    .line 530
    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/peptalk/client/lbs/android/CdmaCell;

    move-object v0, v3

    move-wide/from16 v1, p1

    invoke-virtual {v0, v1, v2}, Lcom/peptalk/client/lbs/android/CdmaCell;->toString(J)Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto :goto_4

    .line 537
    .end local v4           #cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .restart local v11       #wifiIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    :cond_7
    invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v12

    check-cast v12, Lcom/peptalk/client/lbs/android/Wifi;

    .line 538
    .local v12, wifiNextOne:Lcom/peptalk/client/lbs/android/Wifi;
    invoke-virtual {v12}, Lcom/peptalk/client/lbs/android/Wifi;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto/16 :goto_2

    .line 546
    .end local v12           #wifiNextOne:Lcom/peptalk/client/lbs/android/Wifi;
    .restart local v3       #NeighboringCellInfoIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/telephony/NeighboringCellInfo;>;"
    .restart local v8       #neighborCellInfos:Ljava/util/List;,"Ljava/util/List<Landroid/telephony/NeighboringCellInfo;>;"
    :cond_8
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Landroid/telephony/NeighboringCellInfo;

    .line 547
    .local v7, neighborCellInfo:Landroid/telephony/NeighboringCellInfo;
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "neighbor cell id: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v7}, Landroid/telephony/NeighboringCellInfo;->getCid()I

    move-result v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v13

    const-string v14, "\n"

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v6, v13}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto/16 :goto_3
.end method

.method public static getInstance(Landroid/content/Context;Ljava/lang/String;)Lcom/peptalk/client/lbs/android/LbsManager;
    .locals 1
    .parameter "context"
    .parameter "lbsKey"

    .prologue
    .line 300
    sget-object v0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    if-nez v0, :cond_0

    .line 301
    sput-object p1, Lcom/peptalk/client/lbs/android/LbsManager;->apiKey:Ljava/lang/String;

    .line 302
    new-instance v0, Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-direct {v0, p0}, Lcom/peptalk/client/lbs/android/LbsManager;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    .line 304
    :cond_0
    sget-object v0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    return-object v0
.end method

.method private getLastKnownLbsCipherText()Ljava/lang/String;
    .locals 3

    .prologue
    .line 377
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    .line 378
    .local v0, currentTime:J
    iget-boolean v2, p0, Lcom/peptalk/client/lbs/android/LbsManager;->debug:Z

    if-eqz v2, :cond_0

    .line 379
    invoke-direct {p0, v0, v1}, Lcom/peptalk/client/lbs/android/LbsManager;->debugRender(J)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lcom/peptalk/client/lbs/android/LbsManager;->debugText:Ljava/lang/String;

    .line 382
    :cond_0
    invoke-direct {p0, v0, v1}, Lcom/peptalk/client/lbs/android/LbsManager;->orgnizeLbsHexData(J)Ljava/lang/String;

    move-result-object v2

    return-object v2
.end method

.method private organizeCarrierLocationHexData(Ljava/io/ByteArrayOutputStream;J)V
    .locals 5
    .parameter "baos"
    .parameter "currentTime"

    .prologue
    const/4 v4, 0x6

    const-wide v2, 0x40f86a0000000000L

    .line 723
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v0, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    cmpg-double v0, v0, v2

    if-gez v0, :cond_0

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v0, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    cmpg-double v0, v0, v2

    if-gez v0, :cond_0

    .line 724
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationProvider:Ljava/lang/String;

    if-eqz v0, :cond_0

    .line 726
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationProvider:Ljava/lang/String;

    const-string v1, "gps"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 727
    invoke-virtual {p1, v4}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 728
    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 734
    :goto_0
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v0, p1, p2, p3}, Lcom/peptalk/client/lbs/android/PhoneLocation;->write(Ljava/io/ByteArrayOutputStream;J)V

    .line 738
    :cond_0
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v0, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    cmpg-double v0, v0, v2

    if-gez v0, :cond_1

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v0, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    cmpg-double v0, v0, v2

    if-gez v0, :cond_1

    .line 739
    invoke-virtual {p1, v4}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 740
    const/4 v0, 0x3

    invoke-virtual {p1, v0}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 741
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v0, p1, p2, p3}, Lcom/peptalk/client/lbs/android/PhoneLocation;->write(Ljava/io/ByteArrayOutputStream;J)V

    .line 743
    :cond_1
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v0, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    cmpg-double v0, v0, v2

    if-gez v0, :cond_2

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v0, v0, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    cmpg-double v0, v0, v2

    if-gez v0, :cond_2

    .line 744
    invoke-virtual {p1, v4}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 745
    const/4 v0, 0x4

    invoke-virtual {p1, v0}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 746
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v0, p1, p2, p3}, Lcom/peptalk/client/lbs/android/PhoneLocation;->write(Ljava/io/ByteArrayOutputStream;J)V

    .line 748
    :cond_2
    return-void

    .line 731
    :cond_3
    invoke-virtual {p1, v4}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 732
    const/4 v0, 0x2

    invoke-virtual {p1, v0}, Ljava/io/ByteArrayOutputStream;->write(I)V

    goto :goto_0
.end method

.method private organizeCarrierLocationJsonData(J)Lorg/json/JSONArray;
    .locals 8
    .parameter "currentTime"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/json/JSONException;
        }
    .end annotation

    .prologue
    const-wide v6, 0x40f86a0000000000L

    .line 607
    new-instance v2, Lorg/json/JSONArray;

    invoke-direct {v2}, Lorg/json/JSONArray;-><init>()V

    .line 608
    .local v2, jsonArray:Lorg/json/JSONArray;
    iget-object v4, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v4, v4, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    cmpg-double v4, v4, v6

    if-gez v4, :cond_0

    iget-object v4, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v4, v4, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    cmpg-double v4, v4, v6

    if-gez v4, :cond_0

    .line 609
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    .line 610
    .local v0, carrier:Lorg/json/JSONObject;
    iget-object v4, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationProvider:Ljava/lang/String;

    if-eqz v4, :cond_4

    .line 612
    iget-object v4, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocationProvider:Ljava/lang/String;

    const-string v5, "gps"

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_3

    .line 613
    const-string v4, "type"

    const-string v5, "gps"

    invoke-virtual {v0, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 621
    :goto_0
    const-string v4, "location"

    iget-object v5, p0, Lcom/peptalk/client/lbs/android/LbsManager;->carrierLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v5, p1, p2}, Lcom/peptalk/client/lbs/android/PhoneLocation;->json(J)Lorg/json/JSONObject;

    move-result-object v5

    invoke-virtual {v0, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 622
    invoke-virtual {v2, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    .line 625
    .end local v0           #carrier:Lorg/json/JSONObject;
    :cond_0
    iget-object v4, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v4, v4, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    cmpg-double v4, v4, v6

    if-gez v4, :cond_1

    iget-object v4, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v4, v4, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    cmpg-double v4, v4, v6

    if-gez v4, :cond_1

    .line 626
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    .line 627
    .local v1, gps:Lorg/json/JSONObject;
    const-string v4, "type"

    const-string v5, "lastgps"

    invoke-virtual {v1, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 628
    const-string v4, "location"

    iget-object v5, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownGpsLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v5, p1, p2}, Lcom/peptalk/client/lbs/android/PhoneLocation;->json(J)Lorg/json/JSONObject;

    move-result-object v5

    invoke-virtual {v1, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 629
    invoke-virtual {v2, v1}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    .line 631
    .end local v1           #gps:Lorg/json/JSONObject;
    :cond_1
    iget-object v4, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v4, v4, Lcom/peptalk/client/lbs/android/PhoneLocation;->lat:D

    cmpg-double v4, v4, v6

    if-gez v4, :cond_2

    iget-object v4, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    iget-wide v4, v4, Lcom/peptalk/client/lbs/android/PhoneLocation;->lon:D

    cmpg-double v4, v4, v6

    if-gez v4, :cond_2

    .line 632
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    .line 633
    .local v3, network:Lorg/json/JSONObject;
    const-string v4, "type"

    const-string v5, "lastnetwork"

    invoke-virtual {v3, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 634
    const-string v4, "location"

    iget-object v5, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastKnownNetworkLocation:Lcom/peptalk/client/lbs/android/PhoneLocation;

    invoke-virtual {v5, p1, p2}, Lcom/peptalk/client/lbs/android/PhoneLocation;->json(J)Lorg/json/JSONObject;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 635
    invoke-virtual {v2, v3}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    .line 637
    .end local v3           #network:Lorg/json/JSONObject;
    :cond_2
    return-object v2

    .line 616
    .restart local v0       #carrier:Lorg/json/JSONObject;
    :cond_3
    const-string v4, "type"

    const-string v5, "network"

    invoke-virtual {v0, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto :goto_0

    .line 619
    :cond_4
    const-string v4, "type"

    const-string v5, ""

    invoke-virtual {v0, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto :goto_0
.end method

.method private orgnizeLbsHexData(J)Ljava/lang/String;
    .locals 18
    .parameter "currentTime"

    .prologue
    .line 649
    new-instance v5, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v5}, Ljava/io/ByteArrayOutputStream;-><init>()V

    .line 651
    .local v5, baos:Ljava/io/ByteArrayOutputStream;
    const/16 v17, 0x3

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 653
    sget v17, Lcom/peptalk/client/lbs/android/LbsManager;->serial:I

    add-int/lit8 v17, v17, 0x1

    sput v17, Lcom/peptalk/client/lbs/android/LbsManager;->serial:I

    .line 654
    sget v17, Lcom/peptalk/client/lbs/android/LbsManager;->serial:I

    shr-int/lit8 v17, v17, 0x8

    move/from16 v0, v17

    and-int/lit16 v0, v0, 0xff

    move/from16 v17, v0

    move/from16 v0, v17

    int-to-byte v0, v0

    move/from16 v17, v0

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 655
    sget v17, Lcom/peptalk/client/lbs/android/LbsManager;->serial:I

    move/from16 v0, v17

    and-int/lit16 v0, v0, 0xff

    move/from16 v17, v0

    move/from16 v0, v17

    int-to-byte v0, v0

    move/from16 v17, v0

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 657
    const/16 v17, 0x8

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 659
    const/16 v17, 0xc9

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 660
    const/16 v17, 0x0

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 662
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    move-object/from16 v17, v0

    move-object/from16 v0, v17

    move-object v1, v5

    invoke-virtual {v0, v1}, Lcom/peptalk/client/lbs/android/Telephone;->writeDeviceInfo(Ljava/io/ByteArrayOutputStream;)V

    .line 664
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    move-object/from16 v17, v0

    move-object/from16 v0, v17

    move-object v1, v5

    invoke-virtual {v0, v1}, Lcom/peptalk/client/lbs/android/Telephone;->writeNetworkInfo(Ljava/io/ByteArrayOutputStream;)V

    .line 666
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->gsmCells:Ljava/util/ArrayList;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->size()I

    move-result v11

    .line 667
    .local v11, gsmSize:I
    if-lez v11, :cond_0

    const/16 v17, 0xff

    move v0, v11

    move/from16 v1, v17

    if-ge v0, v1, :cond_0

    .line 669
    const/16 v17, 0x1

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 671
    move v0, v11

    and-int/lit16 v0, v0, 0xff

    move/from16 v17, v0

    move/from16 v0, v17

    int-to-byte v0, v0

    move/from16 v17, v0

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 672
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->gsmCells:Ljava/util/ArrayList;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->clone()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/util/ArrayList;

    .line 673
    .local v9, gsmCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    invoke-virtual {v9}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v10

    .line 674
    .local v10, gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    :goto_0
    invoke-interface {v10}, Ljava/util/Iterator;->hasNext()Z

    move-result v17

    if-nez v17, :cond_4

    .line 679
    .end local v9           #gsmCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    .end local v10           #gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    :cond_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->cdmaCells:Ljava/util/ArrayList;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->size()I

    move-result v8

    .line 680
    .local v8, cdmaSize:I
    if-lez v8, :cond_1

    const/16 v17, 0xff

    move v0, v8

    move/from16 v1, v17

    if-ge v0, v1, :cond_1

    .line 682
    const/16 v17, 0x2

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 684
    move v0, v8

    and-int/lit16 v0, v0, 0xff

    move/from16 v17, v0

    move/from16 v0, v17

    int-to-byte v0, v0

    move/from16 v17, v0

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 685
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->cdmaCells:Ljava/util/ArrayList;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->clone()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/util/ArrayList;

    .line 686
    .local v6, cdmaCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    invoke-virtual {v6}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v7

    .line 687
    .local v7, cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    :goto_1
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v17

    if-nez v17, :cond_5

    .line 692
    .end local v6           #cdmaCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .end local v7           #cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    :cond_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->wifis:Ljava/util/ArrayList;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->size()I

    move-result v14

    .line 693
    .local v14, wifiSize:I
    if-lez v14, :cond_2

    const/16 v17, 0xff

    move v0, v14

    move/from16 v1, v17

    if-ge v0, v1, :cond_2

    .line 695
    const/16 v17, 0x3

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 696
    move v0, v14

    and-int/lit16 v0, v0, 0xff

    move/from16 v17, v0

    move/from16 v0, v17

    int-to-byte v0, v0

    move/from16 v17, v0

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 697
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->wifis:Ljava/util/ArrayList;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->clone()Ljava/lang/Object;

    move-result-object v16

    check-cast v16, Ljava/util/ArrayList;

    .line 698
    .local v16, wifisT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/Wifi;>;"
    invoke-virtual/range {v16 .. v16}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v15

    .line 699
    .local v15, wifisIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    :goto_2
    invoke-interface {v15}, Ljava/util/Iterator;->hasNext()Z

    move-result v17

    if-nez v17, :cond_6

    .line 704
    .end local v15           #wifisIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    .end local v16           #wifisT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/Wifi;>;"
    :cond_2
    move-object/from16 v0, p0

    move-object v1, v5

    move-wide/from16 v2, p1

    invoke-direct {v0, v1, v2, v3}, Lcom/peptalk/client/lbs/android/LbsManager;->organizeCarrierLocationHexData(Ljava/io/ByteArrayOutputStream;J)V

    .line 707
    invoke-virtual {v5}, Ljava/io/ByteArrayOutputStream;->size()I

    move-result v17

    rem-int/lit8 v13, v17, 0x10

    .line 708
    .local v13, mod:I
    if-eqz v13, :cond_3

    .line 709
    const/4 v12, 0x0

    .local v12, ii:I
    :goto_3
    const/16 v17, 0x10

    sub-int v17, v17, v13

    move v0, v12

    move/from16 v1, v17

    if-lt v0, v1, :cond_7

    .line 713
    .end local v12           #ii:I
    :cond_3
    invoke-virtual {v5}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v4

    .line 715
    .local v4, b:[B
    :try_start_0
    invoke-virtual {v5}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    .line 718
    :goto_4
    const-string v17, "Chinese: WSJ [i)"

    move-object v0, v4

    move-object/from16 v1, v17

    invoke-static {v0, v1}, Lcom/peptalk/client/lbs/android/AESEncrypt;->encrypt([BLjava/lang/String;)[B

    move-result-object v17

    invoke-static/range {v17 .. v17}, Lcom/peptalk/client/lbs/android/AESEncrypt;->byte2HexString([B)Ljava/lang/String;

    move-result-object v17

    return-object v17

    .line 675
    .end local v4           #b:[B
    .end local v8           #cdmaSize:I
    .end local v13           #mod:I
    .end local v14           #wifiSize:I
    .restart local v9       #gsmCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    .restart local v10       #gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    :cond_4
    invoke-interface {v10}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/peptalk/client/lbs/android/GsmCell;

    move-object v0, v4

    move-object v1, v5

    move-wide/from16 v2, p1

    invoke-virtual {v0, v1, v2, v3}, Lcom/peptalk/client/lbs/android/GsmCell;->write(Ljava/io/ByteArrayOutputStream;J)V

    goto/16 :goto_0

    .line 688
    .end local v9           #gsmCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    .end local v10           #gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    .restart local v6       #cdmaCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .restart local v7       #cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .restart local v8       #cdmaSize:I
    :cond_5
    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/peptalk/client/lbs/android/CdmaCell;

    move-object v0, v4

    move-object v1, v5

    move-wide/from16 v2, p1

    invoke-virtual {v0, v1, v2, v3}, Lcom/peptalk/client/lbs/android/CdmaCell;->write(Ljava/io/ByteArrayOutputStream;J)V

    goto/16 :goto_1

    .line 700
    .end local v6           #cdmaCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .end local v7           #cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .restart local v14       #wifiSize:I
    .restart local v15       #wifisIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    .restart local v16       #wifisT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/Wifi;>;"
    :cond_6
    invoke-interface {v15}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/peptalk/client/lbs/android/Wifi;

    invoke-virtual {v4, v5}, Lcom/peptalk/client/lbs/android/Wifi;->write(Ljava/io/ByteArrayOutputStream;)V

    goto :goto_2

    .line 710
    .end local v15           #wifisIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    .end local v16           #wifisT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/Wifi;>;"
    .restart local v12       #ii:I
    .restart local v13       #mod:I
    :cond_7
    const/16 v17, 0x0

    move-object v0, v5

    move/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 709
    add-int/lit8 v12, v12, 0x1

    goto :goto_3

    .line 716
    .end local v12           #ii:I
    .restart local v4       #b:[B
    :catch_0
    move-exception v17

    goto :goto_4
.end method

.method private orgnizeLbsJsonData(J)Ljava/lang/String;
    .locals 20
    .parameter "currentTime"

    .prologue
    .line 554
    new-instance v13, Lorg/json/JSONObject;

    invoke-direct {v13}, Lorg/json/JSONObject;-><init>()V

    .line 556
    .local v13, jsonObject:Lorg/json/JSONObject;
    :try_start_0
    const-string v18, "version"

    const-string v19, "1.0"

    move-object v0, v13

    move-object/from16 v1, v18

    move-object/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 557
    const-string v18, "serial"

    sget v19, Lcom/peptalk/client/lbs/android/LbsManager;->serial:I

    move-object v0, v13

    move-object/from16 v1, v18

    move/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 558
    new-instance v7, Lorg/json/JSONObject;

    invoke-direct {v7}, Lorg/json/JSONObject;-><init>()V

    .line 559
    .local v7, client:Lorg/json/JSONObject;
    const-string v18, "platform"

    const-string v19, "android"

    move-object v0, v7

    move-object/from16 v1, v18

    move-object/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 560
    const-string v18, "sdk"

    sget-object v19, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;

    move-object v0, v7

    move-object/from16 v1, v18

    move-object/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 561
    const-string v18, "client"

    move-object v0, v13

    move-object/from16 v1, v18

    move-object v2, v7

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 562
    const-string v18, "device"

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    move-object/from16 v19, v0

    invoke-virtual/range {v19 .. v19}, Lcom/peptalk/client/lbs/android/Telephone;->jsonDevice()Lorg/json/JSONObject;

    move-result-object v19

    move-object v0, v13

    move-object/from16 v1, v18

    move-object/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 563
    const-string v18, "network"

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    move-object/from16 v19, v0

    invoke-virtual/range {v19 .. v19}, Lcom/peptalk/client/lbs/android/Telephone;->jsonNetwork()Lorg/json/JSONObject;

    move-result-object v19

    move-object v0, v13

    move-object/from16 v1, v18

    move-object/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 564
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->gsmCells:Ljava/util/ArrayList;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Ljava/util/ArrayList;->size()I

    move-result v11

    .line 565
    .local v11, gsmSize:I
    new-instance v12, Lorg/json/JSONArray;

    invoke-direct {v12}, Lorg/json/JSONArray;-><init>()V

    .line 566
    .local v12, gsms:Lorg/json/JSONArray;
    if-lez v11, :cond_0

    const/16 v18, 0xff

    move v0, v11

    move/from16 v1, v18

    if-ge v0, v1, :cond_0

    .line 567
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->gsmCells:Ljava/util/ArrayList;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Ljava/util/ArrayList;->clone()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/util/ArrayList;

    .line 568
    .local v9, gsmCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    invoke-virtual {v9}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v10

    .line 569
    .local v10, gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    :goto_0
    invoke-interface {v10}, Ljava/util/Iterator;->hasNext()Z

    move-result v18

    if-nez v18, :cond_3

    .line 573
    .end local v9           #gsmCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    .end local v10           #gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    :cond_0
    const-string v18, "gsms"

    move-object v0, v13

    move-object/from16 v1, v18

    move-object v2, v12

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 575
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->cdmaCells:Ljava/util/ArrayList;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Ljava/util/ArrayList;->size()I

    move-result v5

    .line 576
    .local v5, cdmaSize:I
    if-lez v5, :cond_1

    const/16 v18, 0xff

    move v0, v5

    move/from16 v1, v18

    if-ge v0, v1, :cond_1

    .line 577
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->cdmaCells:Ljava/util/ArrayList;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Ljava/util/ArrayList;->clone()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/util/ArrayList;

    .line 578
    .local v3, cdmaCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v4

    .line 579
    .local v4, cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    new-instance v6, Lorg/json/JSONArray;

    invoke-direct {v6}, Lorg/json/JSONArray;-><init>()V

    .line 580
    .end local v3           #cdmaCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .local v6, cdmas:Lorg/json/JSONArray;
    :goto_1
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v18

    if-nez v18, :cond_4

    .line 583
    const-string v18, "cdmas"

    move-object v0, v13

    move-object/from16 v1, v18

    move-object v2, v6

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 586
    .end local v4           #cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .end local v6           #cdmas:Lorg/json/JSONArray;
    :cond_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->wifis:Ljava/util/ArrayList;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Ljava/util/ArrayList;->size()I

    move-result v15

    .line 587
    .local v15, wifiSize:I
    if-lez v15, :cond_2

    const/16 v18, 0xff

    move v0, v15

    move/from16 v1, v18

    if-ge v0, v1, :cond_2

    .line 588
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/LbsManager;->wifis:Ljava/util/ArrayList;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Ljava/util/ArrayList;->clone()Ljava/lang/Object;

    move-result-object v17

    check-cast v17, Ljava/util/ArrayList;

    .line 589
    .local v17, wifisT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/Wifi;>;"
    invoke-virtual/range {v17 .. v17}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v16

    .line 590
    .local v16, wifisIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    new-instance v14, Lorg/json/JSONArray;

    invoke-direct {v14}, Lorg/json/JSONArray;-><init>()V

    .line 591
    .local v14, wifiJson:Lorg/json/JSONArray;
    :goto_2
    invoke-interface/range {v16 .. v16}, Ljava/util/Iterator;->hasNext()Z

    move-result v18

    if-nez v18, :cond_5

    .line 594
    const-string v18, "wifis"

    move-object v0, v13

    move-object/from16 v1, v18

    move-object v2, v14

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 597
    .end local v14           #wifiJson:Lorg/json/JSONArray;
    .end local v16           #wifisIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    .end local v17           #wifisT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/Wifi;>;"
    :cond_2
    const-string v18, "locations"

    invoke-direct/range {p0 .. p2}, Lcom/peptalk/client/lbs/android/LbsManager;->organizeCarrierLocationJsonData(J)Lorg/json/JSONArray;

    move-result-object v19

    move-object v0, v13

    move-object/from16 v1, v18

    move-object/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 598
    invoke-virtual {v13}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v18

    .line 603
    .end local v5           #cdmaSize:I
    .end local v7           #client:Lorg/json/JSONObject;
    .end local v11           #gsmSize:I
    .end local v12           #gsms:Lorg/json/JSONArray;
    .end local v15           #wifiSize:I
    :goto_3
    return-object v18

    .line 570
    .restart local v7       #client:Lorg/json/JSONObject;
    .restart local v9       #gsmCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    .restart local v10       #gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    .restart local v11       #gsmSize:I
    .restart local v12       #gsms:Lorg/json/JSONArray;
    :cond_3
    invoke-interface {v10}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/peptalk/client/lbs/android/GsmCell;

    move-object v0, v3

    move-wide/from16 v1, p1

    invoke-virtual {v0, v1, v2}, Lcom/peptalk/client/lbs/android/GsmCell;->json(J)Lorg/json/JSONObject;

    move-result-object v18

    move-object v0, v12

    move-object/from16 v1, v18

    invoke-virtual {v0, v1}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto/16 :goto_0

    .line 599
    .end local v7           #client:Lorg/json/JSONObject;
    .end local v9           #gsmCellsT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    .end local v10           #gsmIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/GsmCell;>;"
    .end local v11           #gsmSize:I
    .end local v12           #gsms:Lorg/json/JSONArray;
    :catch_0
    move-exception v18

    move-object/from16 v8, v18

    .line 601
    .local v8, e:Lorg/json/JSONException;
    invoke-virtual {v8}, Lorg/json/JSONException;->printStackTrace()V

    .line 603
    const/16 v18, 0x0

    goto :goto_3

    .line 581
    .end local v8           #e:Lorg/json/JSONException;
    .restart local v4       #cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .restart local v5       #cdmaSize:I
    .restart local v6       #cdmas:Lorg/json/JSONArray;
    .restart local v7       #client:Lorg/json/JSONObject;
    .restart local v11       #gsmSize:I
    .restart local v12       #gsms:Lorg/json/JSONArray;
    :cond_4
    :try_start_1
    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/peptalk/client/lbs/android/CdmaCell;

    move-object v0, v3

    move-wide/from16 v1, p1

    invoke-virtual {v0, v1, v2}, Lcom/peptalk/client/lbs/android/CdmaCell;->json(J)Lorg/json/JSONObject;

    move-result-object v18

    move-object v0, v6

    move-object/from16 v1, v18

    invoke-virtual {v0, v1}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    goto/16 :goto_1

    .line 592
    .end local v4           #cdmaIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/CdmaCell;>;"
    .end local v6           #cdmas:Lorg/json/JSONArray;
    .restart local v14       #wifiJson:Lorg/json/JSONArray;
    .restart local v15       #wifiSize:I
    .restart local v16       #wifisIterator:Ljava/util/Iterator;,"Ljava/util/Iterator<Lcom/peptalk/client/lbs/android/Wifi;>;"
    .restart local v17       #wifisT:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/peptalk/client/lbs/android/Wifi;>;"
    :cond_5
    invoke-interface/range {v16 .. v16}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/peptalk/client/lbs/android/Wifi;

    invoke-virtual {v3}, Lcom/peptalk/client/lbs/android/Wifi;->json()Lorg/json/JSONObject;

    move-result-object v18

    move-object v0, v14

    move-object/from16 v1, v18

    invoke-virtual {v0, v1}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_2
.end method

.method private requstLocation(Ljava/lang/String;)Ljava/lang/String;
    .locals 10
    .parameter "cipherText1"

    .prologue
    .line 761
    :try_start_0
    new-instance v6, Ljava/net/URL;

    const-string v7, "http://lbs.org.cn/api/lbs/location_service.php"

    invoke-direct {v6, v7}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    .line 762
    .local v6, url:Ljava/net/URL;
    invoke-virtual {v6}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;

    move-result-object v1

    check-cast v1, Ljava/net/HttpURLConnection;

    .line 763
    .local v1, conn:Ljava/net/HttpURLConnection;
    const/4 v7, 0x1

    invoke-virtual {v1, v7}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V

    .line 764
    const/4 v7, 0x1

    invoke-virtual {v1, v7}, Ljava/net/HttpURLConnection;->setDoInput(Z)V

    .line 765
    invoke-virtual {v1}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v3

    .line 766
    .local v3, out:Ljava/io/OutputStream;
    new-instance v0, Ljava/lang/StringBuffer;

    invoke-direct {v0}, Ljava/lang/StringBuffer;-><init>()V

    .line 767
    .local v0, buffer:Ljava/lang/StringBuffer;
    const-string v7, "<location ver=\'3.0\' key=\'"

    invoke-virtual {v0, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 768
    sget-object v7, Lcom/peptalk/client/lbs/android/LbsManager;->apiKey:Ljava/lang/String;

    if-eqz v7, :cond_0

    sget-object v7, Lcom/peptalk/client/lbs/android/LbsManager;->apiKey:Ljava/lang/String;

    :goto_0
    invoke-virtual {v0, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 769
    const-string v7, "\' os=\'"

    invoke-virtual {v0, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 770
    sget-object v7, Landroid/os/Build;->MODEL:Ljava/lang/String;

    invoke-virtual {v0, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 771
    const-string v7, "\'><locate hex=\'"

    invoke-virtual {v0, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 772
    invoke-virtual {v0, p1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 773
    const-string v7, "\'/></location>"

    invoke-virtual {v0, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 774
    invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/String;->getBytes()[B

    move-result-object v7

    invoke-virtual {v3, v7}, Ljava/io/OutputStream;->write([B)V

    .line 775
    invoke-virtual {v3}, Ljava/io/OutputStream;->flush()V

    .line 776
    new-instance v4, Ljava/io/BufferedReader;

    new-instance v7, Ljava/io/InputStreamReader;

    invoke-virtual {v1}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;

    move-result-object v8

    const-string v9, "utf-8"

    invoke-direct {v7, v8, v9}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/lang/String;)V

    invoke-direct {v4, v7}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 777
    .local v4, reader:Ljava/io/BufferedReader;
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    .line 778
    .local v5, sb:Ljava/lang/StringBuilder;
    const/4 v2, 0x0

    .line 779
    .local v2, line:Ljava/lang/String;
    :goto_1
    invoke-virtual {v4}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v2

    if-nez v2, :cond_1

    .line 782
    invoke-virtual {v1}, Ljava/net/HttpURLConnection;->disconnect()V

    .line 783
    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 788
    .end local v0           #buffer:Ljava/lang/StringBuffer;
    .end local v1           #conn:Ljava/net/HttpURLConnection;
    .end local v2           #line:Ljava/lang/String;
    .end local v3           #out:Ljava/io/OutputStream;
    .end local v4           #reader:Ljava/io/BufferedReader;
    .end local v5           #sb:Ljava/lang/StringBuilder;
    .end local v6           #url:Ljava/net/URL;
    :goto_2
    return-object v7

    .line 768
    .restart local v0       #buffer:Ljava/lang/StringBuffer;
    .restart local v1       #conn:Ljava/net/HttpURLConnection;
    .restart local v3       #out:Ljava/io/OutputStream;
    .restart local v6       #url:Ljava/net/URL;
    :cond_0
    const-string v7, ""

    goto :goto_0

    .line 780
    .restart local v2       #line:Ljava/lang/String;
    .restart local v4       #reader:Ljava/io/BufferedReader;
    .restart local v5       #sb:Ljava/lang/StringBuilder;
    :cond_1
    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    :try_end_0
    .catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

    goto :goto_1

    .line 784
    .end local v0           #buffer:Ljava/lang/StringBuffer;
    .end local v1           #conn:Ljava/net/HttpURLConnection;
    .end local v2           #line:Ljava/lang/String;
    .end local v3           #out:Ljava/io/OutputStream;
    .end local v4           #reader:Ljava/io/BufferedReader;
    .end local v5           #sb:Ljava/lang/StringBuilder;
    .end local v6           #url:Ljava/net/URL;
    :catch_0
    move-exception v7

    .line 788
    :goto_3
    const-string v7, ""

    goto :goto_2

    .line 785
    :catch_1
    move-exception v7

    goto :goto_3
.end method

.method private resetCell()V
    .locals 1

    .prologue
    .line 754
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->gsmCells:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 755
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->cdmaCells:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 757
    return-void
.end method

.method private updateTelephoneInfo()V
    .locals 2

    .prologue
    .line 469
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v0, v0, Lcom/peptalk/client/lbs/android/Telephone;->model:Ljava/lang/String;

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->model:Ljava/lang/String;

    .line 470
    :cond_0
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getDeviceId()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getDeviceId()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->deviceId:Ljava/lang/String;

    .line 471
    :cond_1
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getDeviceSoftwareVersion()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getDeviceSoftwareVersion()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->deviceSoftwareVersion:Ljava/lang/String;

    .line 472
    :cond_2
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getLine1Number()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_3

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getLine1Number()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->line1Number:Ljava/lang/String;

    .line 473
    :cond_3
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkCountryIso()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getNetworkCountryIso()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->networkCountryIso:Ljava/lang/String;

    .line 474
    :cond_4
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkOperator()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_5

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getNetworkOperator()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->networkOperator:Ljava/lang/String;

    .line 475
    :cond_5
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkOperatorName()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_6

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getNetworkOperatorName()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->networkOperatorName:Ljava/lang/String;

    .line 476
    :cond_6
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkType()I

    move-result v0

    if-eqz v0, :cond_7

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getNetworkType()I

    move-result v1

    iput v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->networkType:I

    .line 477
    :cond_7
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimCountryIso()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_8

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getSimCountryIso()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->simCountryIso:Ljava/lang/String;

    .line 478
    :cond_8
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimOperator()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_9

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getSimOperator()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->simOperator:Ljava/lang/String;

    .line 479
    :cond_9
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimOperatorName()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_a

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getSimOperatorName()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->SimOperatorName:Ljava/lang/String;

    .line 480
    :cond_a
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimSerialNumber()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_b

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getSimSerialNumber()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->SimSerialNumber:Ljava/lang/String;

    .line 481
    :cond_b
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSubscriberId()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_c

    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->getSubscriberId()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->subscriberId:Ljava/lang/String;

    .line 482
    :cond_c
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phone:Lcom/peptalk/client/lbs/android/Telephone;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    invoke-virtual {v1}, Landroid/telephony/TelephonyManager;->isNetworkRoaming()Z

    move-result v1

    iput-boolean v1, v0, Lcom/peptalk/client/lbs/android/Telephone;->isNetworkRoaming:Z

    .line 483
    return-void
.end method


# virtual methods
.method public destroy()V
    .locals 3

    .prologue
    .line 394
    invoke-direct {p0}, Lcom/peptalk/client/lbs/android/LbsManager;->resetCell()V

    .line 396
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->telephonyManager:Landroid/telephony/TelephonyManager;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->phoneStateListener:Landroid/telephony/PhoneStateListener;

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/telephony/TelephonyManager;->listen(Landroid/telephony/PhoneStateListener;I)V

    .line 397
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->context:Landroid/content/Context;

    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->wifiReciever:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 398
    const/4 v0, 0x0

    sput-object v0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    .line 399
    return-void
.end method

.method public getDebugText()Ljava/lang/String;
    .locals 1

    .prologue
    .line 386
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->debugText:Ljava/lang/String;

    return-object v0
.end method

.method public getLastKnownLocation()Landroid/location/Location;
    .locals 1

    .prologue
    .line 792
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lastLocation:Landroid/location/Location;

    return-object v0
.end method

.method public removeLbsUpdates(Landroid/location/LocationListener;)Z
    .locals 3
    .parameter "listener"

    .prologue
    .line 350
    iget-object v1, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsTasks:Ljava/util/HashMap;

    monitor-enter v1

    .line 351
    :try_start_0
    iget-object v2, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsTasks:Ljava/util/HashMap;

    invoke-virtual {v2, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/TimerTask;

    .line 352
    .local v0, timerTask:Ljava/util/TimerTask;
    if-eqz v0, :cond_0

    .line 353
    invoke-virtual {v0}, Ljava/util/TimerTask;->cancel()Z

    .line 354
    monitor-exit v1

    const/4 v1, 0x1

    .line 357
    :goto_0
    return v1

    .line 350
    :cond_0
    monitor-exit v1

    .line 357
    const/4 v1, 0x0

    goto :goto_0

    .line 350
    .end local v0           #timerTask:Ljava/util/TimerTask;
    :catchall_0
    move-exception v2

    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v2
.end method

.method public declared-synchronized requestLbsCipherText(JLandroid/os/Looper;)Ljava/lang/String;
    .locals 3
    .parameter "maxTime"
    .parameter "looper"

    .prologue
    .line 367
    monitor-enter p0

    :try_start_0
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    .line 368
    .local v0, currentTime:J
    invoke-direct {p0, p1, p2, p3}, Lcom/peptalk/client/lbs/android/LbsManager;->buildLbsCipherText(JLandroid/os/Looper;)V

    .line 369
    iget-boolean v2, p0, Lcom/peptalk/client/lbs/android/LbsManager;->debug:Z

    if-eqz v2, :cond_0

    .line 370
    invoke-direct {p0, v0, v1}, Lcom/peptalk/client/lbs/android/LbsManager;->debugRender(J)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lcom/peptalk/client/lbs/android/LbsManager;->debugText:Ljava/lang/String;

    .line 373
    :cond_0
    invoke-direct {p0, v0, v1}, Lcom/peptalk/client/lbs/android/LbsManager;->orgnizeLbsHexData(J)Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v2

    monitor-exit p0

    return-object v2

    .line 367
    .end local v0           #currentTime:J
    :catchall_0
    move-exception v2

    monitor-exit p0

    throw v2
.end method

.method public requestLbsLocationUpdates(JFLandroid/location/LocationListener;)Z
    .locals 6
    .parameter "minTime"
    .parameter "minDistance"
    .parameter "listener"

    .prologue
    .line 340
    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v5

    move-object v0, p0

    move-wide v1, p1

    move v3, p3

    move-object v4, p4

    invoke-virtual/range {v0 .. v5}, Lcom/peptalk/client/lbs/android/LbsManager;->requestLbsLocationUpdates(JFLandroid/location/LocationListener;Landroid/os/Looper;)Z

    move-result v0

    return v0
.end method

.method public requestLbsLocationUpdates(JFLandroid/location/LocationListener;Landroid/os/Looper;)Z
    .locals 7
    .parameter "minTime"
    .parameter "minDistance"
    .parameter "listener"
    .parameter "looper"

    .prologue
    .line 318
    if-nez p4, :cond_0

    .line 319
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v2, "Listener==null"

    invoke-direct {v0, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 321
    :cond_0
    const-wide/16 v2, 0x0

    cmp-long v0, p1, v2

    if-gez v0, :cond_1

    .line 322
    const-wide/16 p1, 0x0

    .line 324
    :cond_1
    const/4 v0, 0x0

    cmpg-float v0, p3, v0

    if-gez v0, :cond_2

    .line 325
    const/4 p3, 0x0

    .line 327
    :cond_2
    iget-object v6, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsTasks:Ljava/util/HashMap;

    monitor-enter v6

    .line 328
    :try_start_0
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsTasks:Ljava/util/HashMap;

    invoke-virtual {v0, p4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/peptalk/client/lbs/android/LbsManager$LbsTimerTask;

    .line 329
    .local v1, timerTask:Lcom/peptalk/client/lbs/android/LbsManager$LbsTimerTask;
    if-nez v1, :cond_3

    .line 330
    new-instance v1, Lcom/peptalk/client/lbs/android/LbsManager$LbsTimerTask;

    .end local v1           #timerTask:Lcom/peptalk/client/lbs/android/LbsManager$LbsTimerTask;
    invoke-direct {v1, p0, p4, p3, p5}, Lcom/peptalk/client/lbs/android/LbsManager$LbsTimerTask;-><init>(Lcom/peptalk/client/lbs/android/LbsManager;Landroid/location/LocationListener;FLandroid/os/Looper;)V

    .line 331
    .restart local v1       #timerTask:Lcom/peptalk/client/lbs/android/LbsManager$LbsTimerTask;
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->timer:Ljava/util/Timer;

    const-wide/16 v2, 0xc8

    move-wide v4, p1

    invoke-virtual/range {v0 .. v5}, Ljava/util/Timer;->scheduleAtFixedRate(Ljava/util/TimerTask;JJ)V

    .line 332
    iget-object v0, p0, Lcom/peptalk/client/lbs/android/LbsManager;->lbsTasks:Ljava/util/HashMap;

    invoke-virtual {v0, p4, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 333
    monitor-exit v6

    const/4 v0, 0x1

    .line 336
    :goto_0
    return v0

    .line 327
    :cond_3
    monitor-exit v6

    .line 336
    const/4 v0, 0x0

    goto :goto_0

    .line 327
    .end local v1           #timerTask:Lcom/peptalk/client/lbs/android/LbsManager$LbsTimerTask;
    :catchall_0
    move-exception v0

    monitor-exit v6
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v0
.end method
